import java.text.SimpleDateFormat;
import java.util.Date;

public class test {
    public static void main(String[] args) {
        SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd");
        SimpleDateFormat sdf = new SimpleDateFormat("EEEE");
        Date parse=new Date();
        try{
          parse = sdf2.parse("2022-02-06");
        }catch (Exception e){

        }


        String  weekString = sdf.format(parse);
        System.out.println(weekString);
    }
}
